/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.st.entity.formula;

import org.hibernate.validator.constraints.Length;
import java.util.List;
import com.jeesite.common.collect.ListUtils;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * 生产配方Entity
 * @author HOHD
 * @version 2020-12-31
 */
@Table(name="st_formula_name", alias="a", columns={
		@Column(name="id", attrName="id", label="id", isPK=true),
		@Column(name="code", attrName="code", label="配方编码"),
		@Column(name="use_state", attrName="useState", label="使用状态"),
		@Column(name="product_id", attrName="productId", label="产品 id"),
		@Column(name="approve_state", attrName="approveState", label="审批状态"),
		@Column(name="approve_man_code", attrName="approveManCode", label="审批人编码"),
		@Column(name="approve_man_name", attrName="approveManName", label="审批人", queryType=QueryType.LIKE),
		@Column(name="create_by", attrName="createBy", label="创建者", isUpdate=false, isQuery=false),
		@Column(name="create_date", attrName="createDate", label="创建时间", isUpdate=false, isQuery=false),
		@Column(name="update_by", attrName="updateBy", label="更新者", isQuery=false),
		@Column(name="update_date", attrName="updateDate", label="更新时间", isQuery=false),
		@Column(name="remarks", attrName="remarks", label="备注信息", queryType=QueryType.LIKE),
	}, orderBy="a.code "
)
public class StFormulaNameChild extends DataEntity<StFormulaNameChild> {
	
	private static final long serialVersionUID = 1L;
	private String code;		// 配方编码
	private Integer useState;		// 使用状态
	private String productId;		// 产品 id
	private Integer approveState;		// 审批状态
	private String approveManCode;		// 审批人编码
	private String approveManName;		// 审批人
	private List<StFormulaDetail> stFormulaDetailList = ListUtils.newArrayList();		// 子表列表
	
	public StFormulaNameChild() {
		this(null);
	}

	public StFormulaNameChild(String id){
		super(id);
	}
	
	@Length(min=0, max=20, message="配方编码长度不能超过 20 个字符")
	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}
	
	public Integer getUseState() {
		return useState;
	}

	public void setUseState(Integer useState) {
		this.useState = useState;
	}
	
	@Length(min=0, max=36, message="产品 id长度不能超过 36 个字符")
	public String getProductId() {
		return productId;
	}

	public void setProductId(String productId) {
		this.productId = productId;
	}
	
	public Integer getApproveState() {
		return approveState;
	}

	public void setApproveState(Integer approveState) {
		this.approveState = approveState;
	}
	
	@Length(min=0, max=20, message="审批人编码长度不能超过 20 个字符")
	public String getApproveManCode() {
		return approveManCode;
	}

	public void setApproveManCode(String approveManCode) {
		this.approveManCode = approveManCode;
	}
	
	@Length(min=0, max=5, message="审批人长度不能超过 5 个字符")
	public String getApproveManName() {
		return approveManName;
	}

	public void setApproveManName(String approveManName) {
		this.approveManName = approveManName;
	}
	
	public List<StFormulaDetail> getStFormulaDetailList() {
		return stFormulaDetailList;
	}

	public void setStFormulaDetailList(List<StFormulaDetail> stFormulaDetailList) {
		this.stFormulaDetailList = stFormulaDetailList;
	}
	
}